const http = uni.$u.http

const api = {
	userInfo: '/api/miniapp/user.php?act=user_info',
	checkUserInfo: '/api/miniapp/user.php?act=check_user_info',
	userUpdate: '/api/miniapp/user.php?act=user_update',
	share: '/api/miniapp/user.php?act=share',
	get_share: '/api/miniapp/user.php?act=get_share',
	index: '/api/miniapp/user.php?act=index',
	login: '/api/miniapp/user.php?act=login',
	phone_login: '/api/miniapp/user.php?act=phone_login',
	coupon_list: '/api/miniapp/user.php?act=coupon_list',
	bindMobile: '/api/miniapp/user.php?act=get_phone_number',
	share_index: '/api/miniapp/system/share_index.php',
	share_event: '/api/miniapp/system/share_event.php',
	event_list: '/api/miniapp/user.php?act=event_list',
	children_list: '/api/miniapp/user/children_list.php',
	children_add: '/api/miniapp/user/children_add.php',
	children_edit: '/api/miniapp/user/children_edit.php',
	children_data: '/api/miniapp/user/children_data.php',
	children_delete: '/api/miniapp/user/children_delete.php',
}


export const children_list = (params,config) => http.post(api.children_list,params, {
	custom: {
		toast: false
	},
	
	...config
})

export const children_add = (params,config) => http.post(api.children_add,params, {
	custom: {
		toast: false
	},
	
	...config
})


export const children_edit = (params,config) => http.post(api.children_edit,params, {
	custom: {
		toast: false
	},
	
	...config
})

export const children_data = (params,config) => http.post(api.children_data,params, {
	custom: {
		toast: false
	},
	
	...config
})

export const children_delete = (params,config) => http.post(api.children_delete,params, {
	custom: {
		toast: false
	},
	
	...config
})


export const follow_official_account_url = (params,config) => http.post(api.follow_official_account_url,params, {
	custom: {
		toast: false
	},
	
	...config
})

export const follow_official_account = (params,config) => http.post(api.follow_official_account,params, {
	custom: {
		toast: false
	},
	
	...config
})

export const user_info_by_id = (params,config) => http.post(api.user_info_by_id,params, {
	custom: {
		toast: false
	},
	
	...config
})

export const director_info = (config) => http.get(api.director_info, {
	custom: {
		toast: false
	},
	
	...config
})

export const add_director = (params,config) => http.post(api.add_director,params, {
	custom: {
		toast: false
	},
	
	...config
})

export const share_index = (params,config) => http.post(api.share_index,params, {
	custom: {
		toast: false
	},
	
	...config
})

export const share_event = (params,config) => http.post(api.share_event,params, {
	custom: {
		toast: false
	},
	
	...config
})

export const get_share = (params,config) => http.post(api.get_share,params, {
	custom: {
		toast: false
	},
	
	...config
})

export const coupon_list = (params,config) => http.post(api.coupon_list,params, {
	custom: {
		toast: false
	},
	
	...config
})

export const bindMobile = (params,config) => http.post(api.bindMobile,params, {
	custom: {
		toast: false
	},
	
	...config
})

export const login = (params,config) => http.post(api.login,params, {
	custom: {
		toast: false
	},
	
	...config
})

export const phoneLogin = (params,config) => http.post(api.phone_login,params, {
	custom: {
		toast: false
	},
	
	...config
})

export const share = (config) => http.get(api.share, {
	custom: {
		toast: false
	},
	
	...config
})

export const index = (config) => http.get(api.index, {
	custom: {
		toast: false
	},
	
	...config
})

export const userInfo = (config) => http.get(api.userInfo, {
	custom: {
		toast: false
	},
	
	...config
})

export const checkUserInfo = (config) => http.get(api.checkUserInfo, {
	custom: {
		toast: false
	},
	
	...config
})

export const userUpdate = (params,config) => http.post(api.userUpdate,params, {
	custom: {
		toast: false
	},
	
	...config
})

export const event_list = (params,config) => http.post(api.event_list,params, {
	custom: {
		toast: false
	},
	
	...config
})
